﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using Fatec.ControleEstoque.Attributes.Security;
using System.ComponentModel;
using Fatec.ControleEstoque.Attributes;

namespace Fatec.ControleEstoque.Data.Model
{
    [Security(Role = "Terceiros", Action = "All")]
    [MetadataType(typeof(TerceirosMetadata))]
    public partial class Terceiros : IValidatable
    {
        public class TerceirosMetadata
        {
            [ScaffoldColumn(false)]
            public object Id { get; set; }

            [HideColumnIn(PageTemplate.List)]
            [UIHint("MaskText")]
            [DataType("CNPJ")]
            public object Cnpj { get; set; }

            [HideColumnIn(PageTemplate.List)]
            public object Ie { get; set; }

            [HideColumnIn(PageTemplate.List)]
            [DisplayName("Razão Social")]
            public object Razao_Social { get; set; }

            [DisplayName("Fantasia")]
            public object Nome_Fantasia { get; set; }

            [DisplayName("Endereço")]
            public object Endereco { get; set; }

            [HideColumnIn(PageTemplate.List)]
            public object Bairro { get; set; }

            public object Cidade { get; set; }

            public object Estado { get; set; }

            [HideColumnIn(PageTemplate.List)]
            [UIHint("MaskText")]
            [DataType("CEP")]
            public object Cep { get; set; }

            [HideColumnIn(PageTemplate.List)]
            public object Pais { get; set; }

            [HideColumnIn(PageTemplate.List)]
            public object Contato { get; set; }

            [UIHint("MaskText")]
            [DataType(DataType.PhoneNumber)]
            public object Telefone { get; set; }

            [UIHint("MaskText")]
            [DataType(DataType.PhoneNumber)]
            [HideColumnIn(PageTemplate.List)]
            public object Fax { get; set; }

            [DataType(DataType.EmailAddress)]
            public object Email { get; set; }

            [HideColumnIn(PageTemplate.List)]
            [DataType(DataType.Url)]
            public object Site { get; set; }

            [DisplayName("Tipo")]
            public object Tipo_Terceiro { get; set; }

            [ScaffoldColumn(false)]
            public object Pedidos_Compra { get; set; }

            [ScaffoldColumn(false)]
            public object Produtos { get; set; }


        }

        #region IValidatable Members

        public string ExceptionMessage
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public bool Validate(System.Data.EntityState state)
        {
            return true;
        }

        #endregion
    }
}
